﻿CREATE PROCEDURE Update_ForeignKeyTable
	@New_CompositeKey1 nvarchar(100),
	@New_CompositeKey2 nvarchar(100),
	@New_CompositeKey3 nvarchar(100),
	@PrimaryKeyId nvarchar(100),
	@TableId int,
	@GuidField uniqueidentifier,
	@Field1 int,
	@Field2 int,
	@CompositeKey1 nvarchar(100),
	@CompositeKey2 nvarchar(100),
	@CompositeKey3 nvarchar(100)
AS
UPDATE [ForeignKeyTable]
SET
	[CompositeKey1] = @New_CompositeKey1,
	[CompositeKey2] = @New_CompositeKey2,
	[CompositeKey3] = @New_CompositeKey3,
	[PrimaryKeyId] = @PrimaryKeyId,
	[TableId] = @TableId,
	[GuidField] = @GuidField,
	[Field1] = @Field1,
	[Field2] = @Field2
WHERE
	[CompositeKey1] = @CompositeKey1 AND
	[CompositeKey2] = @CompositeKey2 AND
	[CompositeKey3] = @CompositeKey3


